package com.lancer.cloud.gateway.feign;

import com.lancer.cloud.common.constants.ServiceNameConstants;
import com.lancer.cloud.common.dto.SysResourceDto;
import com.lancer.cloud.gateway.feign.fallback.SysResourceFallback;
import java.util.Set;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * 系统资源服务
 *
 * @author caijinbang
 * @date 2019-06-16 13:30
 */
@FeignClient(value = ServiceNameConstants.LANCER_USER_SERVICE, fallback = SysResourceFallback.class)
public interface SysResourceService {


    /**
     * 根据角色查询资源信息
     * @param roleCode
     * @return
     */
    @GetMapping("/resource/role/{roleCode}")
    Set<SysResourceDto> listResourceByRole(@PathVariable("roleCode") String roleCode);
}
